﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace Utils.MVC
{
    public static class ControllerExtension
    {
        private const string KeyName = "jaMes";
        public static void AddMessage(this Controller controller,string mes)
        {
            if(string.IsNullOrEmpty(mes))
                return;
            controller.ViewData.ModelState.AddModelError(KeyName,mes);
        }
    }
}
